<template>
  <div class="container">
    <div>
      年纪:{{ $attrs.msg }}性别：{{$attrs.title}}  儿子组件：{{$attrs.msg}}
    </div>
    <!-- sun -->
    <p>孙子组件</p>
    <sunzi v-bind="$attrs"></sunzi>

  </div>

</template>

<script>
import sunzi from '../components/sunzi.vue'

export default {
  // eslint-disable-next-line key-spacing
  components:{
    sunzi
  },
  inheritAttrs: true,
  created () {
    console.log(111, '创建')
  },

  updated () {
    console.log(111, '更新')
  },
  mounted () {
    console.log(111, '挂载', this.$attrs)
  }
  // watch() {},
}
</script>

<!-- <style scoped lang='less'></style> -->
